#! /usr/bin/env python

# camera dynamic configuration

PACKAGE='chapter6_tutorials'
import roslib; roslib.load_manifest(PACKAGE)

from dynamic_reconfigure.parameter_generator import *
from driver_base.msg import SensorLevels

gen = ParameterGenerator()

#       Name, Type, Reconfiguration level, Description, Default, Min, Max

gen.add("camera_index_left", int_t, SensorLevels.RECONFIGURE_CLOSE,
        "Left camera device index, e.g. 0 for /dev/video0", 1, 0, 10)

gen.add("camera_index_right", int_t, SensorLevels.RECONFIGURE_CLOSE,
        "Right camera device index, e.g. 1 for /dev/video1", 2, 0, 10)

gen.add("frame_width", int_t, SensorLevels.RECONFIGURE_CLOSE,
        "Frame width", 640, 1, 2000)

gen.add("frame_height", int_t, SensorLevels.RECONFIGURE_CLOSE,
        "Frame height", 480, 1, 2000)

gen.add("fps", double_t, SensorLevels.RECONFIGURE_RUNNING,
        "Frames Per Second (FPS)", 30., 0., 120.)

gen.add("fourcc", str_t, SensorLevels.RECONFIGURE_CLOSE,
        "FourCC code", "YUYV")

gen.add("brightness", double_t, SensorLevels.RECONFIGURE_RUNNING,
        "Brightness", 0.5, 0., 1.)

gen.add("contrast", double_t, SensorLevels.RECONFIGURE_RUNNING,
        "Contrast", 1., 0., 1.)

gen.add("saturation", double_t, SensorLevels.RECONFIGURE_RUNNING,
        "Saturation", 1., 0., 1.)

gen.add("hue", double_t, SensorLevels.RECONFIGURE_RUNNING,
        "Hue", 0.5, 0., 1.)

gen.add("gain", double_t, SensorLevels.RECONFIGURE_RUNNING,
        "Gain", 0., 0., 1.)

gen.add("exposure", double_t, SensorLevels.RECONFIGURE_RUNNING,
        "Exposure", 0.5, 0., 1.)

gen.add("frame_id", str_t, SensorLevels.RECONFIGURE_CLOSE,
        "ROS tf frame of reference, resolved with tf_prefix unless absolute.",
        "camera")

gen.add("camera_info_url_left", str_t, SensorLevels.RECONFIGURE_RUNNING,
        "Left camera [[camera_info_manager#URL_Names|calibration URL]] for this video_mode (uncalibrated if null).", "")

gen.add("camera_info_url_right", str_t, SensorLevels.RECONFIGURE_RUNNING,
        "Right camera [[camera_info_manager#URL_Names|calibration URL]] for this video_mode (uncalibrated if null).", "")

exit(gen.generate(PACKAGE, "CameraStereo", "CameraStereo"))

